﻿<?php
/* require_once("../class2.php");
require_once(HEADERF);
require_once("./cms/includes/require_all.php");
$database->cyr_chars();
$page_class = "PlayON"; //Key for non-users
ramka("open");

$q = "SELECT * FROM admin_panel";
$r = mysql_query($q);
$translations = array();
$level_access = array();
while($a = mysql_fetch_array($r)){
	$k = (string)$a['game_name']." [".$a['game_platform']."]";
	$v = (string)$a['game_prefix'];
	$translations[$k] = $v;
	$level_access[$k] = $a['level_access'];
}

echo "<a href='index.php' style='font-size: 18px;'>НАЗАД</a><br><br>";

foreach($translations as $key => $value){
	if($level_access[$key] == 2 and !check_class($page_class)){
		continue;
	}
	else{
		$asd = array();
		echo "<div style='color: #FFF; text-align: center; width: 500px; position: relative; margin-left: auto; margin-right: auto; font-size: 14px;'>";
		echo "<h2>".$key."</h2><br>";
		// $sql = "SELECT translator FROM ".$value."_text";
		// $result = mysql_query($sql);
		// $array = array();
		// while($b = mysql_fetch_array($result))
			// {
				// if ( $b['translator'] != '' AND $b['translator'] != 'original' )
					// { 
						// $array[] = $b['translator'];
					// }
			// }
		// $array = array_count_values($array);
		
		$query = "select distinct translator_name from ".$value."_translations where status = 'Одобрен'";
		$result = mysql_query($query);
		while($array = mysql_fetch_array($result)){
			$br = 0;
			$q = "select * from ".$value."_translations where status = 'Одобрен' and translator_name = '".$array['translator_name']."'";
			$r = mysql_query($q);
			while($a = mysql_fetch_array($r)){
				$x = explode("\n", $a['translation']);
				clear_array($x);
				$br += count($x);
			}
			$asd[$array['translator_name']] = $br;
		}
		arsort($asd);
		foreach($asd as $k => $v){
			echo "$k [$v]<br>";
		}
		
		echo "</div><br><br>";
	}
}

ramka("close");
require_once(FOOTERF); */
?>